-
Notifications
You must be signed in to change notification settings - Fork 74
Add deadLetterPolicy to PulsarListener #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
spring-pulsar/src/main/java/org/springframework/pulsar/core/DefaultPulsarConsumerFactory.java
Show resolved
Hide resolved
@alpreu, this is cool. I will start reviewing this PR soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alpreu thanks for another awesome contribution! Looks great. I have a few minor comments.
spring-pulsar/src/main/java/org/springframework/pulsar/annotation/PulsarListener.java
Outdated
Show resolved
Hide resolved
spring-pulsar/src/main/java/org/springframework/pulsar/core/DefaultPulsarConsumerFactory.java
Show resolved
Hide resolved
...src/main/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainer.java
Show resolved
Hide resolved
.../java/org/springframework/pulsar/listener/ConcurrentPulsarMessageListenerContainerTests.java
Outdated
Show resolved
Hide resolved
.../java/org/springframework/pulsar/listener/ConcurrentPulsarMessageListenerContainerTests.java
Show resolved
Hide resolved
.../java/org/springframework/pulsar/listener/ConcurrentPulsarMessageListenerContainerTests.java
Outdated
Show resolved
Hide resolved
...est/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainerTests.java
Outdated
Show resolved
Hide resolved
...est/java/org/springframework/pulsar/listener/DefaultPulsarMessageListenerContainerTests.java
Show resolved
Hide resolved
spring-pulsar/src/test/java/org/springframework/pulsar/listener/PulsarListenerTests.java
Outdated
Show resolved
Hide resolved
spring-pulsar/src/test/java/org/springframework/pulsar/listener/PulsarListenerTests.java
Outdated
Show resolved
Hide resolved
Thanks for the awesome PR @alpreu . I have fixed conflict locally but when I run all tests I get a failure in PulsarListenerTests (of course works fine when run by itself). PulsarListenerTests > DeadLetterPolicyTest STANDARD_OUT
12:29:31.220 [Test worker] ERROR org.springframework.pulsar.listener.DefaultPulsarMessageListenerContainer - Pulsar client exceptions.
org.apache.pulsar.client.api.PulsarClientException$IncompatibleSchemaException: {"errorMsg":"Incompatible schema: exists schema type INT32, new schema type STRING","reqId":2109641079268052675, "remote":"localhost/127.0.0.1:51249", "local":"/127.0.0.1:51436"}
at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:1014) ~[pulsar-client-api-2.10.1.jar:2.10.1]
at org.apache.pulsar.client.impl.ConsumerBuilderImpl.subscribe(ConsumerBuilderImpl.java:101) ~[pulsar-client-2.10.1.jar:2.10.1]
at org.springframework.pulsar.core.DefaultPulsarConsumerFactory.createConsumer(DefaultPulsarConsumerFactory.java:104) ~[main/:?]
at org.springframework.pulsar.listener.DefaultPulsarMessageListenerContainer$Listener.<init>(DefaultPulsarMessageListenerContainer.java:191) ~[main/:?]
at org.springframework.pulsar.listener.DefaultPulsarMessageListenerContainer.doStart(DefaultPulsarMessageListenerContainer.java:95) ~[main/:?]
at org.springframework.pulsar.listener.AbstractPulsarMessageListenerContainer.start(AbstractPulsarMessageListenerContainer.java:169) ~[main/:?]
at org.springframework.pulsar.listener.ConcurrentPulsarMessageListenerContainer.doStart(ConcurrentPulsarMessageListenerContainer.java:83) ~[main/:?]
at org.springframework.pulsar.listener.AbstractPulsarMessageListenerContainer.start(AbstractPulsarMessageListenerContainer.java:169) ~[main/:?]
at org.springframework.pulsar.config.PulsarListenerEndpointRegistry.startIfNecessary(PulsarListenerEndpointRegistry.java:239) ~[main/:?]
at org.springframework.pulsar.config.PulsarListenerEndpointRegistry.start(PulsarListenerEndpointRegistry.java:191) ~[main/:?]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-6.0.0-SNAPSHOT.jar:6.0.0-SNAPSHOT]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] I am going to merge as @sobychacko is going to build on top of this work. @sobychacko can you follow up w/ the test failure? |
Closed via 25dcfab |
This PR adds the ability to add DeadLetterPolicy beans to the PulsarListener annotation (#79).
Mostly based on Soby's work done in #85